package com.fy.tt.service;


import com.fy.tt.entity.Script;
import com.fy.tt.entity.Semantic;
import com.fy.tt.entity.query.ScriptQuery;
import com.fy.tt.entity.vo.RunScriptVo;
import com.fy.tt.entity.vo.ScriptVo;
import com.fy.tt.util.R;

import java.util.List;

public interface ScriptService  {
    List<ScriptVo> getAllScripts();

    int getTotalScript(ScriptQuery scriptQuery);

    int addScript(Script script);

    int deleteScript(int id);

    int updateScript(Script script);

    // 分页查询
    List<Script> getPageScripts(int pageSize, int current);

    // 分页多条件查询
    List<ScriptVo> getConditionPageScripts(ScriptQuery scriptQuery, int pageSize, int current);

    // 获得相关词汇对应语义
    List<Semantic> getRelatedSemantic(int id);

    R runScript(List<RunScriptVo> scripts, int bandId);

    R deBugScript(List<RunScriptVo> scripts, int bandId);

    R showAST(List<RunScriptVo> scripts, int bandId);

    R pushScript(int scriptId, int bandId);

    R pullScript(int scriptId, int bandId);

    List<ScriptVo> getLastSaveScript();

    List<ScriptVo> getLastRunScript();

    // 测试新版g4文件
    R runScriptTest(List<RunScriptVo> scripts, int bandId, int scriptId);

    R deBugScriptTest(List<RunScriptVo> scripts, int bandId, int scriptId);

    R showASTTest(List<RunScriptVo> scripts, int bandId);
}
